home *** CD-ROM | disk | FTP | other *** search
- #include "FX.h"
-
- #define WWIDTH 420
- #define WHEIGHT 200
-
- #define WLEFT (((screenBits.bounds.right - screenBits.bounds.left) - WWIDTH) / 2)
- #define WTOP (((screenBits.bounds.bottom - screenBits.bounds.top) - WHEIGHT) / 2)
-
- void drawMyString();
-
- void doAboutBox()
- {
- int col, row;
- int width, height;
- WindowPtr window;
- CIconHandle cicn;
- Rect rect;
- RGBColor color;
-
- cicn = GetCIcon( 128 );
- HPurge( cicn );
-
- SetRect( &rect, WLEFT, WTOP, WLEFT + WWIDTH, WTOP + WHEIGHT );
- window = NewCWindow( 0L, &rect, "\p", true, plainDBox, (WindowPtr)-1L, false, 0L );
- SetPort( window );
-
- TextFont( geneva );
- TextMode( srcOr );
-
- color.red = color.green = color.blue = 8700;
- RGBForeColor( &color );
-
- rect = window->portRect;
- InsetRect( &rect, 1, 1 );
- PaintRect( &rect );
-
- width = 32 * 6;
- height = width;
-
- SetRect( &rect, 3, 3, width + 3, height + 3 );
- PlotCIcon( &rect, cicn );
-
- ForeColor( blackColor );
-
- for (row = 6; row < height; row += 6)
- {
- MoveTo( rect.left, rect.top + row );
- LineTo( rect.left + width, rect.top + row );
- }
-
- for (col = 6; col < width; col += 6)
- {
- MoveTo( rect.left + col, rect.top );
- LineTo( rect.left + col, rect.top + height );
- }
-
- col = width + 15;
- row = 35;
-
- TextFont( times );
- TextSize( 36 );
-
- color.blue = 0xffff;
- color.red = color.green = 0;
- RGBForeColor( &color );
- drawMyString( col, &row, 30, "\pQuickDraw™" );
-
- color.blue = 0x9fff;
- RGBForeColor( &color );
- drawMyString( col + 45, &row, -5, "\pFX" );
-
- TextFont( geneva );
- TextSize( 9 );
- ForeColor( whiteColor );
-
- col += 10;
-
- drawMyString( col + 115, &row, 25, "\pVersion 1.0" );
- drawMyString( col, &row, 20, "\pBrought to you by Edgar Lee." );
-
- drawMyString( col, &row, 13, "\pFor any suggestions or comments," );
- drawMyString( col, &row, 13, "\pplease write to edgar@apple.com" );
- drawMyString( col, &row, 20, "\por appleLink EDGAR." );
-
- drawMyString( col, &row, 15, "\p© 1992 Apple Computer, Inc." );
- drawMyString( col, &row, 25, "\pAll rights reserved." );
-
- TextFont( times );
- TextSize( 36 );
-
- ForeColor( redColor );
- drawMyString( col + 125, &row, 0, "\pDTS" );
-
- while (!Button());
-
- DisposeWindow( window );
- }
-
- void drawMyString( col, row, increment, string )
- int col, *row, increment;
- Str255 string;
- {
- RGBColor color;
-
- GetForeColor( &color );
-
- ForeColor( blackColor );
- MoveTo( col + 2, *row + 2 );
- DrawString( string );
-
- RGBForeColor( &color );
- MoveTo( col, *row );
- DrawString( string );
-
- *row += increment;
- }